<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>justify-content</title>
    <style>
        .flexText {
            display: flex;
            /* 设置子项目在主轴上的对齐方式 justify-content */
            /*
                flex-start （默认值）左对齐
                flex-end 右对齐
                center 居中
                space-between 两端对齐，子项目之间的间隔一样
                space-around 每个子项目两侧的间隔一样
            */
            justify-content: space-around;
        }

        .item {
            width: 100px;
            height: 100px;
            background: #C3C3C3;
            margin: 10px;
        }
    </style>
</head>
<body>
<div class="flexText">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
</div>
</body>
</html>
